package com.pti.usermanager.dao.mapper;

import com.pti.usermanager.dao.po.MenuPo;
import com.pti.usermanager.dao.po.PostPo;
import com.pti.usermanager.web.dto.request.SaveMenuRequest;
import com.pti.usermanager.web.dto.request.UpdateMenuRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName: MenuMapper
 * @Author: liuyueyang
 * @Description: 菜单数据层
 * @Date: 2019/1/18
 */
@Mapper
public interface MenuMapper {

    //菜单数据结构查询
    List<MenuPo> findTreeByMenu();
    //查看菜单详情
    MenuPo findAllByMenuId(@Param("menuId") Long menuId);
    //菜单列表
    List<MenuPo> findAllMenu(@Param("menuNm") String menuNm);
    //添加菜单
    void saveMenu(@Param("saveMenuRequest") SaveMenuRequest saveMenuRequest);
    //修改菜单
    void updateMenu(@Param("updateMenuRequest") UpdateMenuRequest updateMenuRequest);
    //删除菜单
    void delMenu(@Param("menuId") Long menuId);
    //根据用户usrId查询菜单
    List<MenuPo> findAllByUsrId(@Param("usrId") Long UsrId);
}
